This bot can balance itself on a flat ground using PID control theory. To keep the robot balanced, the motors must counteract the falling robot. This action requires feedback and correcting elements. The feedback element is the MPU6050 gyroscope + accelerometer, which gives both acceleration and rotation in all three axes. The Arduino uses this to know the current orientation of the robot.